import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { GeneralProduct } from './GeneralProduct';
@Injectable()
export class EbaoService {

  private ebaoUrl = 'api/product';  // URL to web api
  constructor(
    private http: HttpClient) { }
  /** GET heroes from the server */
  getGeneralProducts(): Observable<GeneralProduct[]> {
    return this.http.get<GeneralProduct[]>(this.ebaoUrl);
  }
}
